<?php

namespace App\Http\Requests;

class UserUpdateRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'avatar' => 'nullable|max:200',
            'name' => 'required|min:1|max:20',
            'phone' => 'nullable|max:20',
            'email' => 'nullable|max:30',
        ];
    }

    public function attributes()
    {
        return [
            'avatar' => '头像',
            'name' => '名称',
            'phone' => '手机号码',
            'email' => '邮箱',
        ];
    }
}
